<template>
    <div class="content">
        <baseTable :column="column" :tableData="tableData" index onload>
            <template #operation>
                <el-button>修改</el-button>
            </template>
        </baseTable>
    </div>
</template>

<script setup>
import baseTable from '@/components/baseTable.vue'
const tableData = [
    {
      date: '2016-05-03',
      name: 'Tom',
      address: 'No. 189, Grove St, Los Angeles',
    },
    {
      date: '2016-05-02',
      name: 'Tom',
      address: 'No. 189, Grove St, Los Angeles',
    },
    {
      date: '2016-05-04',
      name: 'Tom',
      address: 'No. 189, Grove St, Los Angeles',
    },
    {
      date: '2016-05-01',
      name: 'Tom',
      address: 'No. 189, Grove St, Los Angeles',
    },
  ]
const column = [{ label:'日期', prop:'date' },
  { label:'姓名', prop:'name' },
  { type:'function',
    label:'地址', 
    prop:'address',
    callback:(data) => {
      return `<a href='#'>${data.address}</a>`
    }
  },
  {
    type:'solt',
    label:'操作',
    prop:'operation',
    slot_name:'operation',
  }]
</script>

<style lang="scss" scoped>
.content{
    width: 100%;
    height: 100%;
}
</style>

